import React, {FC, PropsWithChildren, Children, ElementType} from 'react';
import { DraggableComponent, IDraggableComponentProps } from '@bastet/widgets'
export { default as settings } from './setting';


const CardComponent: FC<PropsWithChildren<IDraggableComponentProps>> = (
  { children, style, ...props }
) => {

  console.log('Card: => ', { children, style, ...props })
  return (
    <DraggableComponent
      style={{...style, background: '#eeefff'/*, left: '100px', top: '100px'*/ }}
      {...props}
    >
      { children && (children as Array<any>).map((Child: any, index) => <Child key={index} dataType={index}>{index}</Child>) }
    </DraggableComponent>
  )
};

export default CardComponent
